<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
        <meta name="description" content="{% block desc %}编程！我们是认真的！{% endblock %}">
        <meta name="author" content="">
        <link rel="icon" href="{{ url_for('main.static', filename='images/favicon.ico')}}">

        <title>{% block title %}藕丝空间{% endblock %}</title>
        {% block css %}
            <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
            <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
            <!-- KaTeX js主题文件 -->
            <link rel="stylesheet" type="text/css"
                  href="https://cdn.bootcss.com/KaTeX/0.7.1/katex.min.css" />
            <!-- 个性化主题文件 -->
            <link href="{{ url_for('main.static', filename='css/monokai.css')}}" rel="stylesheet">
            <link href="{{ url_for('main.static', filename='css/offcanvas.css')}}" rel="stylesheet">
            <!-- font-awesome 主题文件 -->
            <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.css"
                  rel="stylesheet">
        {% endblock %}

        {% block js %}
            <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
            <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
            <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
            <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
            <!-- 加载KaTeX js 文件 -->
            <script type="text/javascript" src="https://cdn.bootcss.com/KaTeX/0.7.1/katex.min.js">
            </script>

            <!-- 个性化 js 文件 -->
            <script src="{{ url_for('main.static', filename='js/offcanvas.js')}}"></script>
            {{ moment.include_moment(local_js=url_for('admin.static', filename='js/moment-with-locales.js')) }}
            {{ moment.lang('zh-cn') }}
            <script type="text/javascript">
                $("tex.tex-inline").each(
                    function(i, domElem) {
                        katex.render(domElem.innerText, domElem, {displayMode: false});
                    });
                $("tex.tex-block").each(
                    function(i, domElem) {
                        katex.render(domElem.innerText, domElem, {displayMode: true});
                    });
            </script>
        {% endblock %}
    </head>

    <body>
        {% include 'common/header.html' %}
        <div class="container">
            <div class="row row-offcanvas row-offcanvas-right">
                <div class="col-xs-12 col-sm-9">
                    <p class="pull-right visible-xs">
                        <button type="button" class="btn btn-primary btn-xs" data-toggle="offcanvas">导航</button>
                    </p>
                    <div class="row">
                        {% block content %}
                        {% endblock %}
                    </div><!--/row-->
                </div><!--/.col-xs-12.col-sm-9-->
                {% include 'common/sidebar.html' %}
            </div><!--/row-->
            {% include 'common/footer.html' %}
        </div><!--/.container-->
    </body>
</html>